function initMy(){
    	var chart = new Highcharts.Chart({
			chart : {
				renderTo : 'container',
				defaultSeriesType : 'column'

			},
			title : {
				text : '进出港VIP航班'
			},

			plotOptions : {
				column : {
					stacking : 'normal'
				},
				series : {
					dataLabels : {
						enabled : true,
						formatter: function() {
					
					if(!isNaN(this.y )){
						
					}else{
					   //alert("不是数字");
					   this.series.options.dataLabels.y=0;
					   this.y=0;
						return "";
					}
											
						
						this.series.options.dataLabels.y =
                            this.y >= 0 ? -6 : 12;
						if(this.y<0){
							return 0-this.y ;
							}
						return	this.y;
                    }
					}
				}
			},
			xAxis : {
				categories :arrayAxis,
				title : {
					text : '时间(小时)'
				}
			},

			yAxis : {
				labels : {
					formatter : function() {
				if(!isNaN(this.value )){
					
				}else{
				   //alert("不是数字");
				  
					return 0;
				}
						if (this.value > 0) {
							//alert(this.value);
							return (this.value);
						}else{
							return 0 - this.value;
						}
					}
				},
				title : {
					text : '架次'
				}
			},
			tooltip : {
				formatter : function() {

					if (this.y > 0) {
						return '<b>' + this.y + '</b>';
					}
					//alert(this.y);
					if(!isNaN(this.y ) ){
						
					}else{
						return '<b>' + 0  + '</b>';
					}
					return '<b>' + (0 - this.y) + '</b>';

				}
			}
			,

			series :
			[{name:'计划出港',
						data :arrayOutPortPlanBar,
						stack : 0,
						color:'#6495ED'						
						}
						,
					{
					name:'计划进港',
						data :arrayInPortPlanBar,
						stack : 0,
						color:'#698B22'
					},
					{
					name:'实际出港',
						data :arrayOutPortActualLine,
						stack : 1,
						type : 'line',
						color:'red'
					},
					{
					name:'实际进港',
						data:arrayInPortActualLine,
						stack : 1,
						type : 'line'
					}
					]

		});
    	chart.redraw();
}



function initArray(){
	if($("#table")!=null){
		//alert("111");
		var d1=	$("#table").getCol("plan_out",false);
		var d2=	$("#table").getCol("plan_in",false);
		var d3=	$("#table").getCol("real_out",false);
		var d4=	$("#table").getCol("real_in",false);
		
     	 d1.shift();
		 d2.shift();
		 d3.shift();
		 d4.shift();
		var chartd1=[];
		var chartd2=[];
		var chartd3=[];
		var chartd4=[];
		for(var i=0;i<24;i++){
				chartd1.push(parseInt(isNaN(d1[i])?0:d1[i]));
				chartd2.push(parseInt(isNaN(d2[i])?0:d2[i]));
				chartd3.push(parseInt(isNaN(d3[i])?0:d3[i]));
				chartd4.push(parseInt(isNaN(d4[i])?0:d4[i]));
			}
		
		  arrayOutPortPlanBar= chartd1;
		  arrayInPortPlanBar  =chartd2;
		  arrayOutPortActualLine =chartd3;
		  arrayInPortActualLine =chartd4;
		  
  
	}else{
		
	}
	
	
}


function printArray(){
	alert("出港计划:"+arrayInPortPlanBar+"\n"+"进港计划:"+arrayOutPortPlanBar+"\n"+"实际出港:"+arrayInPortActualLine+"\n"+"实际进港计划:"+arrayOutPortActualLine+"\n");
}

